<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>06_原型链补充</title>
</head>

<body>
    <script type="text/javascript">
        function Foo() { };
        var f1 = new Foo();
        Foo.prototype.x = "hello";
        f1.x   //=> hello
        Foo.x //=> undefined

        //All instances inherit from the prototype object of the function that created them.
        console.log(f1.__proto__ === Foo.prototype);
        console.log(Foo.__proto__ === Function.prototype);
        console.log(f1.__proto__.__proto__ === Object.prototype);
        console.log(Object.prototype.__proto__);

    </script>
</body>

</html>